#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
  pid_t id = fork();//创建子进程
  if (0 == id)//子进程
  {
    while (1)
    {
      printf("I am child,  %d, %p\n", id, &id);
      sleep(1);
    }
  }
  else //parent
  {
    while (1)
    {
      printf("I am father, %d, %p\n", id, &id);
      sleep(1);
    }
  }
  return 0;
}
